#include "Rp2UserConstant.h"

using namespace Rp2;

//---------------------------------------------------------------------------------------------------
UserConstant::UserConstant(const std::string& rkName, int iBaseRegister, int iRegisterQuantity)
	:
	m_kName(rkName)
{
    assert(iBaseRegister >= 0);
    assert(iRegisterQuantity > 0);

    m_iBaseRegister = iBaseRegister;
    m_iRegisterQuantity = iRegisterQuantity;

    // To be set later in the effect creation.
    m_afData = 0;	
}
//---------------------------------------------------------------------------------------------------
UserConstant::~UserConstant()
{
    // The memory pointed to by m_afData is not owned by UserConstant, so
    // no deletion occurs here.
}
//---------------------------------------------------------------------------------------------------
void UserConstant::SetDataSource(float* afData)
{
	assert(afData);
	m_afData = afData;
}
//---------------------------------------------------------------------------------------------------